home *** CD-ROM | disk | FTP | other *** search
- fd2lib by Volker Barthelmann
-
-
- INTRODUCTION
-
- fd2lib takes .fd-files as input and generates assembler source to
- create a library with stubs to call the functions (including stubs
- for varargs functions).
- It will create stubs suitable for vbcc, i.e. restore all necessary
- registers (including a6) etc.
-
-
- LEGAL
-
- fd2lib is public domain.
-
-
- USAGE
-
- fd2lib [options] .fd-files
-
- options at the moment can be:
-
- -sc generate small code stubs (not really useful)
- -sd generate small data stubs
- -prof generate code with profiling (not yet implemented)
-
- fd2lib will process all the .fd-files specified at the command line
- and will generate an assembler source for each library function as
- T:functionname.s and a file containing all the library vector offsets
- as T:fd-file_LVO.s
-
-
- VARARGS
-
- Some functions take a pointer to a list of arguments as the last
- argument. fd2lib has a hardcoded list of such function and creates
- additional stubs that can be called with a variable number of arguments
- from C (e.g. OpenWindowTagList and OpenWindowTags).
-
- If You want to extend this list, You have to add the name of the
- function and the name of the varargs function to the file vargs.h
- and recompile fd2lib.
-
-
- CREATING LIBRARIES
-
- If You want to create a library from some .fd-files proceed like this:
-
- delete t:#?.(s|o) quiet
- fd2lib <all the .fd-files You want>
- (copying FreePhxAss to ram: now may speed up the process)
- vc -c T:#?.s
- join T:#?.o to <name of resulting lib>
- delete T:#?.(s|o)
-
-
- MakeALIB.script
-
- This is a small script which will create an amiga.lib in T:. It
- will delete files from T: before and assumes nothing is written to T:
- while it is running.
-
- You have to assign FD: to a directory that contains the .fd-files for
- the Amiga shared libraries and cd into the libsrc/AmigaLib directory
- and start it from there.
-
- It will then create all library stubs and LVOs with fd2lib (this will
- result in many many small files in T: which will be assembled by
- FreePhxAss - so having FreePhxAss in RAM: will speed it up quite a
- lot).
- Then the support routines in libsrc/AmigaLib will be compiled/assembled
- and the resulting object files will be put in t:, too. You must have
- the C= includes.
- The support routines are taken from libnix and have been changed a bit
- to work with vbcc. I have not tested them and several support routines
- from the original amiga.lib are missing.
-
- The whole process may take quite some time and a few MB space in T:
- The resulting amiga.lib should be free from any copyright and is a
- rather good (but not complete) replacement for the original amiga.lib
- and can be copied to vlib:.
-
- A small-data-amigas.lib can be created the same way (MakeALIBS.script
- should already be there).
-
-
- Volker Barthelmann volker@vb.franken.de
-
-